#! /bin/bash

# 2d-9p 2d-heat 3d-27p 3d-heat 3d-pois
for exe in 1d-heat 
do
    rm $exe.txt
    for i in `seq 1 4 101`;
    do
        echo  "np = $i" >> ./$exe.txt
        if [[ $exe =~ "1d" ]]; then
            for n in `seq 100 100 1000`;
            do
                mpirun -np $i ./$exe $n 1000 1 >> ./$exe.txt
            done
            for n in `seq 2000 1000 10000`;
            do
                mpirun -np $i ./$exe $n 1000 1 >> ./$exe.txt
            done
            for n in `seq 20000 10000 100000`;
            do
                mpirun -np $i ./$exe $n 1000 1 >> ./$exe.txt
            done
            for n in `seq 200000 100000 1000000`;
            do
                mpirun -np $i ./$exe $n 1000 1 >> ./$exe.txt
            done
            for n in `seq 2000000 1000000 10000000`;
            do
                mpirun -np $i ./$exe $n 1000 1 >> ./$exe.txt
            done
        fi
    done
done
